package com.sitechasia.webx.components.xtable.toolbar;

import org.extremecomponents.table.core.TableModel;
import org.extremecomponents.table.view.AbstractHtmlView;
import org.extremecomponents.util.HtmlBuilder;

/**
 * 数商前台view，列表有两个toolbar的样例，相应的JSP中要修改checkpage js
 * @author Administrator
 *
 */
public class CustomdivSSqtView extends AbstractHtmlView {
	@Override
	protected void beforeBodyInternal(TableModel model) {

		toolbar(getHtmlBuilder(), getTableModel(),"TOP");


		getTableBuilder().tableStart();

		getTableBuilder().theadStart();

		getTableBuilder().titleRowSpanColumns();

		getTableBuilder().headerRow();

		getTableBuilder().theadEnd();

		getTableBuilder().tbodyStart();

	}

	@Override
	protected void afterBodyInternal(TableModel model) {
		getCalcBuilder().defaultCalcLayout();
		getTableBuilder().tbodyEnd();
		getTableBuilder().tableEnd();

		toolbar(getHtmlBuilder(), getTableModel(),"BOTTOM");


	}

	protected void toolbar(HtmlBuilder html, TableModel model,String location) {

		(new CustomdivSSqtToolbar(html, model,location)).layout();
	}

	protected void toolbarBottom(HtmlBuilder html, TableModel model,String location) {

		(new CustomdivSSqtToolbar(html, model, location)).layout();
	}
}